package com.thinkingcoder.tcgateway.plugin;

import org.springframework.web.server.ServerWebExchange;

import com.thinkingcoder.tcgateway.plugin.chain.GatewayPluginChain;

import reactor.core.publisher.Mono;

/**
 * gateway plugin.
 */
public interface GatewayPlugin {

    void start();

    void stop();

    String getName();

    String getContext();

    String getPrefix();

    boolean support(ServerWebExchange exchange);

    Mono<Void> handle(ServerWebExchange exchange, GatewayPluginChain chain);

}
